<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
<!--     <link rel="shortcut icon" href="../../assets/ico/favicon.png"> -->

    <title>Veterinaria Fenix</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap-3.1.1.css" rel="stylesheet" media="screen">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="../../assets/js/html5shiv.js"></script>
      <script src="../../assets/js/respond.min.js"></script>
    <![endif]-->
    
    
    <link rel="stylesheet" href="dv/themes/base/jquery.ui.all.css">
	
	
	
	
	
  </head>

  <body>
        
	  <!-- Static navbar -->
	  <div class="navbar navbar-default navbar-static-top">
	    <div class="container">
	      <div class="navbar-header">
	        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
	          <span class="icon-bar"></span>
	          <span class="icon-bar"></span>
	          <span class="icon-bar"></span>
	        </button>
	        <a class="navbar-brand" href="principal.jsp">Veterinaria Fenix</a>
	      </div>
	      <div class="navbar-collapse collapse">
	        <ul class="nav navbar-nav">
	          <li><a href="principal.jsp">Inicio</a></li>
	          <li class="dropdown active">
	            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Mantenimientos <b class="caret"></b></a>
	            <ul class="dropdown-menu">
	              <li><a href="roles_buscar.jsp">Medicamentos</a></li>
	              <li><a href="#">Doctores</a></li>	              
	            </ul>
	          </li>
	          <li><a href="#">Reportes</a></li>	          
	          <li><a href="LogoutServlet">Salir</a></li>
	        </ul>
	      </div><!--/.nav-collapse -->
	    </div>
	  </div>
      
	 <div class="container"> 

<form method=post action=HistorialBuscarServlet class="form-horizontal" role="form">
<fieldset>
<legend>Buscar por</legend>

<table width="47%" border="0">
  <tbody>
    <tr>
      <td width="11%">&nbsp;</td>
      <td width="13%">&nbsp;</td>
      <td colspan="2">FECHAS</td>
      <td width="54%">&nbsp;</td>
    </tr>
    <tr>
      <td>Nro Comprobantes </td>
      <td>Cliente</td>
      <td width="11%">DE</td>
      <td width="11%">A</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><input type=text name=comprobante id=comprobante></td>
      <td><input type=text name=cliente></td>
      <td><input type=text name=f1 class="datepicker"></td>
      <td><input type=text name=f2 class="datepicker"></td>
      <td><input name="Buscar" type=submit id="Buscar" value="Buscar"></td>
    </tr>
  </tbody>
</table>
</fieldset>
</form>


<div class="table-responsive">
		<table width="95%" height="30" border="0" cellpadding="0" cellspacing="0" class="table table-hover">
		  <tr>
          	<th width="27" height="28" scope="col"></th>
          	<th width="57" scope="col">Tipo</th>

		    <th width="141" height="28" scope="col">Nro.</th>
		    <th width="198" scope="col">Nombre Due&ntilde;o</th>
		    <th width="133" scope="col">RUC</th>
		    <th width="308" scope="col">Direccion</th>
		    <th width="200" scope="col">F Registros</th>
		    <th width="88" scope="col">Estado</th>
		  </tr>
		
		  <%@page import="java.util.*, veterinaria.modelo.Comprobante" %>
		<%
		Collection<Comprobante> arreglo = (ArrayList<Comprobante>)request.getAttribute("comprobantes");
		if(arreglo != null) { 
		int i = 1;
		for(Comprobante x : arreglo) {
		%>  
		  <tr>
		    <td><%=i++ %></td>
		    <td><% out.print(x.getTipo()); %></td>
		    <td><% out.print(x.getIdComprobante()); %></td>
  		    <td><% out.print(x.getCliente().getNombreCompleto()); %></td>
  		    <td><% out.print(x.getCliente().getRucdni()); %></td>
  		    <td><% out.print(x.getCliente().getDireccion()); %></td>

		    <td><% out.print(x.getFechaRegistro()); %></td>
		    <td><% out.print(x.getEstado()); %></td>
		    
		  </tr>
		<% }  
		  } %>
		</table>
		</div>


 <!-- Site footer -->
	   <div class="footer">
	   	 <p>&nbsp;</p>
	     <p>&copy; Veterinaria 2014 </p>
	   </div>
	   
	 </div> <!-- /container -->
    
   


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    
     <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery-1.10.2.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap-3.1.1.js"></script>
    
	<script src="dv/ui/jquery.ui.core.js"></script>
	<script src="dv/ui/jquery.ui.widget.js"></script>
	<script src="dv/ui/jquery.ui.datepicker.js"></script>
	<script>
	$(function() {
		$( ".datepicker" ).datepicker(
				
				{ dateFormat: 'yy-mm-dd' }
				
		);
	});
	</script>
	
	
  </body>
</html>